package com.imooc.user.handler;

import com.imooc.user.thrift.ServiceProvider;
import org.apache.thrift.transport.TTransportException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

import java.net.SocketTimeoutException;

/**
 * @Auther: zhaozeyang
 * @Date: 2018/8/29 11:16
 * @Description:
 */
@RestControllerAdvice
public class ExceptionHandlers {

    @ExceptionHandler(SocketTimeoutException.class)
    public void SocketTimeoutExceptionHandler(SocketTimeoutException e) throws TTransportException {
   /*     ServiceProvider.map1.get("transport").flush();
        ServiceProvider.map1.get("transport").close();
        ServiceProvider.map1.clear();
        e.printStackTrace();*/
    }

}
